﻿using System;
using System.Drawing;
using DevExpress.CodeRush.StructuralParser;
using DX_Contrib.Painting;

namespace Blazing.DXCodeExtensions.Settings
{
    public class VarSettings : MemberSettings
    {

        public PaintOptions Local = new PaintOptions();
        public PaintOptions ParamIn = new PaintOptions();
        public PaintOptions ParamOut = new PaintOptions();
        public PaintOptions ParamArray = new PaintOptions();
        public PaintOptions ParamRef = new PaintOptions();
        public enum ParamQualifier
        {
            In,
            Out,
            Ref
        }
        public override PaintOptions GetScopedOptions(IMemberElement Member)
        {
            if (Member == null)
            {
                return null;
            }
            if (Member.Visibility != MemberVisibility.Local)
            {
                return base.GetScopedOptions(Member);
            }
            if (!(Member is Param))
            {
                return Local;
            }
            switch (((Param)Member).Direction)
            {
                case ArgumentDirection.In:
                    return ParamIn;
                case ArgumentDirection.Out:
                    return ParamOut;
                case ArgumentDirection.ParamArray:
                    return ParamArray;
                case ArgumentDirection.Ref:
                    return ParamRef;
            }

            return null;
        }

    }
}



